package com.csw.xuxianParent.xuxianUser;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import com.csw.xuxianParent.xuxianCommon2.utils.IdWorker;
import com.csw.xuxianParent.xuxianCommon2.utils.JwtUtil;

@SpringBootApplication
public class XuxianUserApplication {
	public static void main(String[] args) {
		SpringApplication.run(XuxianUserApplication.class);
	}

	@Bean
	public IdWorker idWorker() {
		return new IdWorker();
	}

	@Bean // 第三步,加密用
	public BCryptPasswordEncoder bCryptPasswordEncoder() {

		return new BCryptPasswordEncoder();
	}

	@Bean
	public JwtUtil jwtUtil() {
		return new JwtUtil();
	}
}
